package org.example.bbook.controller;


import org.example.bbook.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RequestMapping("yml")
@RestController
public class ReadymlController {

    @Value("${mykey}")
    private String key;


    @Autowired
    private Student student;


    @RequestMapping("/readyml")
    public String readYml(){
        return key;
    }
    @RequestMapping("/readyStudent")
    public String readyStudent(){
        return "从yml中获取配置文件Student" + student;
    }

}
